<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<link rel="stylesheet" type="text/css" href="../template/css.css"
		media="all" />
	<title>QueroTeto</title>
</h:head>
<h:body>
	<div id="corpo">
		<ui:include src="/template/topo.xhtml" />
		<ui:include src="/template/menu.xhtml" />
		<div id="slide"></div>
		<div id="conteudo">
			<div id="centro">

				
				<p:panel header="Imóvel">
    					<h:panelGrid columns="2" cellpadding="5">
				    				    	
				      	<h:outputText value="Proprietário: " />  
            			<h:outputText value="#{imovelBean.imovel.usuario.apelido}"/>
            			
            			<h:outputText value="Email: " />  
            			<h:outputText value="#{imovelBean.imovel.usuario.email}"/>
            			
            			<h:outputText value="Celular: " />  
            			<h:outputText value="#{imovelBean.imovel.usuario.foneCelular}"/>
            			
            			<h:outputText value="Rua: " />  
            			<h:outputText value="#{imovelBean.imovel.rua}"/>
            			
            			<h:outputText value="Bairro: "  />  
            			<h:outputText value="#{imovelBean.imovel.bairro}" required="true" id="bairro"/>
            			
            			<h:outputText value="CEP: "/>  
            			<h:outputText value="#{imovelBean.imovel.cep}" mask="99999-999" id="cep"/>
            			
            			<h:outputText value="Cidade: " />  
            			<h:outputText value="#{imovelBean.imovel.cidade}" required="true" id="cidade"/>
            			
            			<h:outputText value="Estado: " />
            			<h:outputText value="#{imovelBean.imovel.estado}" required="true" id="estado"/>
            			             
            			<h:outputText value="Numero: " />  
            			<h:outputText value="#{imovelBean.imovel.numero}" id="numero"/>
            			
            			<h:outputText value="Referencia: " />  
            			<h:outputText value="#{imovelBean.imovel.referencia}" required="true" id="referencia"/>  
	              
			            <h:outputText value="Tipo " />  
            			<h:outputText value="#{imovelBean.imovel.tipo}"/>
            			
            			<h:outputText value="Quantidade de quartos: " />  
            			<h:outputText value="#{imovelBean.imovel.qtdQuartos}"/>
              
            			<h:outputText value="Quantidade de banheiros: " />  
			            <h:outputText value="#{imovelBean.imovel.qtdBanheiros}" />  
    					
    					<h:outputText value="Possui garagem: " />  
			            <h:outputText value="#{imovelBean.imovel.garagem?'Sim':'Não'}" />
    					
  						<h:outputText value="Valor aluguel: " />  
			            <h:outputText value="R$#{imovelBean.imovel.valorAluguel}">
			            		<f:convertNumber pattern="#,##0" locale="pt_BR"/>
			            </h:outputText>
  
 					    <h:outputText value="Descrição: " />
						<h:outputText value="#{imovelBean.imovel.descricao}" />
					</h:panelGrid>
				</p:panel>	

				<h:form rendered="#{imovelBean.possuiFotos}">
					<h3>Fotos</h3>
					<p:commandButton type="button" onclick="switcher.previous();"
						icon="ui-icon-circle-triangle-w" />
					<p:commandButton type="button" onclick="switcher.next();"
						icon="ui-icon-circle-triangle-e" />
	
					<p:imageSwitch effect="wipe" widgetVar="switcher"
						slideshowAuto="false">
						<ui:repeat value="#{imovelBean.listFotos}" var="image">
							<p:graphicImage value="#{image}" width="500" height="500"/>
						</ui:repeat>
					</p:imageSwitch>
			
				</h:form>
			</div>
			
			
			<div id="direita" align="center"></div>
		</div>
		<div id="both" align="center"></div>
		<ui:include src="/template/rodape.xhtml" />
	</div>
</h:body>
</html>